package com.aggressionlabs.test.security.model;

import org.eclipse.jetty.util.security.Credential;

import java.io.Serializable;
import java.security.Principal;

/**
 * Created by shirland on 12/9/14.
 */
public class ValidUser implements Serializable, Principal {

    private String _name = null;
    private Credential _credential = null;

    private ValidUser(String name){

        _name = name;
        //_credential = pass;

    }

    public void setCredential(Credential pass){
        _credential = pass;
    }

    public Credential getCredential(){
        return _credential;
    }


    @Override
    public String getName() {
        return _name;
    }

    public static ValidUser get(String s) {
        ValidUser user = new ValidUser(s);


        return user;

    }
}
